package com.demo.word2html.poi.support;

import org.apache.poi.hwpf.converter.FontReplacer;
import org.apache.poi.hwpf.converter.HtmlDocumentFacade;
import org.apache.poi.hwpf.converter.WordToHtmlConverter;
import org.apache.poi.hwpf.usermodel.CharacterRun;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 * @author fenggang.li
 * @create 2019-09-11 09:32
 */
public class IgnoreFontFamilyWordToHtmlConverter extends WordToHtmlConverter {
    public IgnoreFontFamilyWordToHtmlConverter(Document document) {
        super(document);
    }

    @Override
    protected FontReplacer.Triplet getCharacterRunTriplet(CharacterRun characterRun) {
        FontReplacer.Triplet triplet = super.getCharacterRunTriplet(characterRun);
        triplet.fontName = "";
        return triplet;
    }
}
